home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / Apps / DevTools / eText5 / Source / Bookmark.subproj / eTBookmarkBinder.h < prev    next >
Encoding:
Text File  |  1994-11-13  |  2.0 KB  |  50 lines

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //    FILENAME:    eTBookmarkBinder.h 
  3. //    SUMMARY:    Appwide rendezvous point for bookmark management
  4. //    SUPERCLASS:    Object
  5. //    INTERFACE:    None
  6. //    PROTOCOLS:    None
  7. //    AUTHOR:        Rohit Khare
  8. //    COPYRIGHT:    (c) 1994 California Institure of Technology, eText Project
  9. ///////////////////////////////////////////////////////////////////////////////
  10. //  DESCRIPTION
  11. //        The Binder enables 3 functions:
  12. //            * when reading in an eText stream, matching up the beginning
  13. //              and ending tags for an anchor
  14. //            * allowing link traversal to select a particular anchor in a doc.
  15. //            * working with the eTBookmarkUI to present a list of anchors 
  16. //              a given doc. 
  17. //        Ideally, we could have a binder for each document, but then we have
  18. //    namespace problems, and we'd have to hardwire new functionality into the
  19. //    kernel. Instead, [eTBookmarkBinder new] returns an appwide binder that
  20. //    internally maintains a table of anchor tables.
  21. //
  22. //    TO DO
  23. //        What are the memory management/integrity constraints on this solution?
  24. //    It requires invariant and unique anchorID-annotation mappings.
  25. //
  26. //        What happens when bookmarks are destroyed/corrupted? memory corruption,
  27. //    unpaired links... bookmark integrity checking?
  28. //
  29. //        What happens to a "stale" anchor-ref-- when the anchor don't exist?
  30. ///////////////////////////////////////////////////////////////////////////////
  31. //    HISTORY
  32. //    06/15/94:    Added dirty bit management. RK & TRZ
  33. //    05/08/94:    Created. First actual implementation.
  34. ///////////////////////////////////////////////////////////////////////////////
  35.  
  36. #import "Bookmark.h"
  37.  
  38. @interface eTBookmarkBinder:Object 
  39. {
  40.     id    docTable;        // A hashtable of hashtables.
  41.     id    anchorTable;    // master anchor concordance -- shortcut
  42.     BOOL dirtyBit;
  43. }
  44.  
  45. - registerBM:theBookmark ID:(long)anchorID inDoc:(long)docID;
  46. - unregisterBM:theBookmark ID:(long)anchorID inDoc:(long)docID;
  47. - getBookmarks:theStorage inDoc:(long)docID;
  48. - bookmarkForID:(long)anchorID;
  49. - (BOOL) isDirty;
  50. @end